import axios from '@/libs/request/axios'
import QS from 'qs';

//查询银行对公结算案件
export const queryCorporateList = (params) => {
    return axios.request({
        url: `/contractManage/corporateTransManagement/queryCorporateList`,
        params: params,
        method: 'post'
    })
}
//导出所有银行对公结算案件
export const exportCorporateList = (params) => {
    return axios.request({
        url: `/contractManage/corporateTransManagement/exportCorporateList`,
        params: params,
        method: 'post'
    })
}
//删除对公结算案件
export const deleteCorporateTransfer = (params) => {
    return axios.request({
        url: `/contractManage/corporateTransManagement/deleteCorporateTransfer`,
        params: params,
        method: 'post'
    })
}
//根据案件编号查询对公结算案件详情
export const queryCorporateByCaseNo = (caseNo) => {
    return axios.request({
        url: `/contractManage/corporateTransManagement/queryCorporateByCaseNo`,
        data: QS.stringify({caseNo:caseNo},{arrayFormat: 'repeat'}),
        method: 'post',
        headers: { 'content-type': 'application/x-www-form-urlencoded' },
    })
}
//为对公勾稽案件匹配银行到账记录
export const machBankArriveList = (params) => {
    return axios.request({
        url: `/contractManage/corporateTransManagement/machBankArriveList`,
        params: params,
        method: 'post'
    })
}
//对公勾稽案件审核通过
export const agreeSubmit = (params) => {
    return axios.request({
        url: `/contractManage/corporateTransManagement/agreeSubmit`,
        params: params,
        method: 'post'
    })
}
//审核通过操作的校验
export const agreeCorporateValid = (params) => {
    return axios.request({
        url: `/contractManage/corporateTransManagement/agreeCorporateValid`,
        params: params,
        method: 'post'
    })
}
//对公勾稽案件审核拒绝
export const refuseSubmit = (params) => {
    return axios.request({
        url: `/contractManage/corporateTransManagement/refuseSubmit`,
        params: params,
        method: 'post'
    })
}
//对公勾稽案件信息保存
export const saveCorporate = (params) => {
    return axios.request({
        url: `/contractManage/corporateTransManagement/saveCorporate`,
        data: params,
        method: 'post'
    })
}
//对公勾稽案件信息提交
export const submitCorporate = (params) => {
    return axios.request({
        url: `/contractManage/corporateTransManagement/submitCorporate`,
        data: params,
        method: 'post'
    })
}

// 多条件查询已激活案件列表
export const findActivatedContractList = (params) => {
    return axios.request({
        url: `/contractBasic/contractList/findActivatedContractList`,
        method: 'POST',
        data: params
    })
};
